<!-- 查看明细modal -->
<div class="modal-dialog modal-lg">
  <div class="modal-content">
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-label="Close">
        <span aria-hidden="true">&times;</span>
      </button>
      <h4 class="modal-title">批次明细</h4>
    </div>

    <div class="modal-body">
      <div class="row" style="margin-bottom:10px">
        <div class="col-md-12">
          <div class="box box-solid">
            <div class="box-header with-border">
              <h3 class="box-title">基本信息</h3>
            </div>
            <!-- /.box-header -->
            <div class="box-body">
              <div class="row">
                <div class="col-md-2">批次号：</div>
                <div class="col-md-2">{{receivedItem.nBatchNo}}</div>
                <!-- <div class="col-md-2">发起日期：</div>
                <div class="col-md-2">{{receivedItem.sLaunchDate}}</div> -->
                <div class="col-md-2">发起时间：</div>
                <div class="col-md-4">{{receivedItem.sLaunchDate}}</div>
              </div>
              <div class="row">
                <div class="col-md-2" style="margin-top:10px">当前流程：</div>
                <div class="col-md-2" style="margin-top:10px"> {{receivedItem.sFlowStepZh}}</div>
              </div>
            </div>

            <div class="box box-solid">
              <div class="box-header with-border">
                <h3 class="box-title">流程信息</h3>
              </div>
              <div class="box-body">
                <table class="table table-bordered table-hover">
                  <tr>
                    <th>序号</th>
                    <th>操作流程</th>
                    <th>操作人</th>
                    <th>处理状态</th>
                    <th>操作日期</th>
                    <th>备注</th>
                  </tr>
                  <tr *ngFor="let item of flowInfoData;let index = index;">
                    <td class="short_name" [attr.title]="index + 1">{{index + 1}}</td>
                    <td class="short_name" [attr.title]="item.sFlowStep">{{item.sFlowStepZh}}</td>
                    <td class="short_name" [attr.title]="item.sOpr">{{item.sOprZh}}</td>
                    <td class="short_name" [attr.title]="item.sOprState">{{item.sOprStateZh}}</td>
                    <td class="short_name" [attr.title]="item.sOprDate">{{item.sOprDate}}</td>
                    <td class="short_name" [attr.title]="item.sOprMark">{{item.sOprMark}}</td>
                  </tr>
                </table>
              </div>
            </div>

            <div class="box box-solid">
              <div class="box-header with-border">
                <h3 class="box-title">条目信息</h3>
              </div>
              <div class="box-body">
                <div class="ibt-fixed-table-container">
                  <div class="table-scroll-content">
                    <table id="route-table" class="table table-bordered table-hover table-striped table-keep-line" style="margin-top:unset !important;">
                      <thead>
                        <tr role="row">
                          <th>
                            <div class="cell" style="width:50px !important">
                              <div class="checkbox checkbox-primary">
                                <input type="checkbox" id="isCheckedAll" [(ngModel)]="isCheckedAll" name="isCheckedAll" (ngModelChange)="checkedAll()">
                                <label>
                                </label>
                              </div>
                            </div>
                          </th>
                          <th>
                            <div class="cell-padding">编号</div>
                          </th>
                          <th>
                            <div class="cell-padding">批次号</div>
                          </th>
                          <th>
                            <div class="cell-padding">当前流程</div>
                          </th>
                          <th>
                            <div class="cell-padding">处理状态</div>
                          </th>
                          <th>
                            <div class="cell-padding">是否有效</div>
                          </th>
                          <th>
                            <div class="cell-padding">条款出处</div>
                          </th>
                          <th>
                            <div class="cell-padding">文件名称</div>
                          </th>

                          <th>
                            <div class="cell-padding">属性</div>
                          </th>

                          <th>
                            <div class="cell-padding">适用QDII类别</div>
                          </th>
                          <th>
                            <div class="cell-padding">适用QDII名称</div>
                          </th>
                          <th>
                            <div class="cell-padding">内容</div>
                          </th>
                          <th>
                            <div class="cell-padding">指标释义</div>
                          </th>
                          <th>
                            <div class="cell-padding">bloomberg系统能否控制</div>
                          </th>
                          <th>
                            <div class="cell-padding">系统设置代码</div>
                          </th>
                          <th>
                            <div class="cell-padding">阀值</div>
                          </th>
                          <th>
                            <div class="cell-padding">人工控制方法说明</div>
                          </th>
                          <th>
                            <div class="cell-padding">系统实施相关条件</div>
                          </th>
                          <th>
                            <div class="cell-padding">备注1</div>
                          </th>
                          <th>
                            <div class="cell-padding">备注2</div>
                          </th>

                        </tr>
                      </thead>
                      <tbody *ngIf="viewDetailType == '2'">
                        <tr *ngFor="let item of listData;let index = index;">
                          <!-- <tr  > -->
                          <td>
                            <div class="cell" style="width:50px !important" id="reviewCheck{{index}}">
                              <div class="checkbox checkbox-primary">
                                <input type="checkbox" id="checkbox1" name="checkbox1" [(ngModel)]="item.isChecked" (ngModelChange)="ctrlCheckAll()">
                                <label>
                                </label>
                              </div>
                            </div>
                          </td>
                          <td [attr.title]="index+1">
                            <div>
                              {{index+1}}
                            </div>
                          </td>
                          <!-- <td [attr.title]="item.nQjId">
                            <div>
                              {{item.nQjId}}
                            </div>
                          </td> -->
                          <td [attr.title]="item.nBatchNo">
                            <div>
                              {{item.nBatchNo}}
                            </div>
                          </td>
                          <td [attr.title]="item.sFlowStep">
                            <div>
                              {{item.sFlowStepZh}}
                            </div>
                          </td>
                          <td [attr.title]="item.sOprState">
                            <div>
                              {{item.sOprStateZh}}
                            </div>
                          </td>
                          <td [attr.title]="item.sValid">
                            <div>
                              {{item.sValidZh}}
                            </div>
                          </td>
                          <td [attr.title]="item.sFileSource">
                            <div class="font-color short_name" id="sFileSource">
                              {{item.sFileSource}}
                            </div>
                          </td>
                          <td [attr.title]="item.sFileName">
                            <div class="font-color short_name" id="sFileName">
                              {{item.sFileName}}
                            </div>
                          </td>
                          <td [attr.title]="item.sItemTypeZh">
                            <div class="font-color" id="sItemTypeZh">
                              {{item.sItemTypeZh}}
                            </div>
                          </td>
                          <td [attr.title]="item.sFundTypeZh">
                            <div class="font-color short_name" id="sFundTypeZh">
                              {{item.sFundTypeZh}}
                            </div>
                          </td>
                          <td [attr.title]="item.sFundGroupdsZh">
                            <div class="font-color short_name" id="sFundGroupdsZh">
                              {{item.sFundGroupdsZh}}
                            </div>
                          </td>
                          <td [attr.title]="item.f1">
                            <div class="font-color short_name" id="f1">
                              {{item.f1}}
                            </div>
                          </td>
                          <td [attr.title]="item.f3">
                            <div class="font-color short_name" id="f3">
                              {{item.f3}}
                            </div>
                          </td>
                          <td [attr.title]="item.f4Zh">
                            <div class="font-color short_name" id="f4">
                              {{item.f4Zh}}
                            </div>
                          </td>
                          <td [attr.title]="item.f5">
                            <div class="font-color short_name" id="f5">
                              {{item.f5}}
                            </div>
                          </td>
                          <td [attr.title]="item.f6">
                            <div class="font-color short_name" id="f6">
                              {{item.f6}}
                            </div>
                          </td>
                          <td [attr.title]="item.f7">
                            <div class="font-color short_name" id="f7">
                              {{item.f7}}
                            </div>
                          </td>
                          <td [attr.title]="item.f8">
                            <div class="font-color short_name" id="f8">
                              {{item.f8}}
                            </div>
                          </td>
                          <td [attr.title]="item.f9">
                            <div class="font-color short_name" id="f9">
                              {{item.f9}}
                            </div>
                          </td>
                          <td [attr.title]="item.f10">
                            <div class="font-color short_name" id="f10">
                              {{item.f10}}
                            </div>
                          </td>
                        </tr>
                      </tbody>
                      <tbody *ngIf="viewDetailType == '1'">
                        <tr *ngFor="let item of listData;let index = index;" (dblclick)="loadFlowInfo(item)">
                          <!-- <tr  > -->
                          <td>
                            <div class="cell" style="width:50px !important" id="routeCheck{{index}}">
                              <div class="checkbox checkbox-primary">
                                <input type="checkbox" name="checkbox1" [(ngModel)]="item.isChecked" (ngModelChange)="ctrlCheckAll()">
                                <label>
                                </label>
                              </div>
                            </div>
                          </td>
                          <td [attr.title]="listData[index].nQjId">
                            <div class="cell">
                              {{item.nQjId}}
                            </div>
                          </td>
                          <td [attr.title]="listData[index].nBatchNo">
                            <div class="cell">
                              {{item.nBatchNo}}
                            </div>
                          </td>
                          <td [attr.title]="listData[index].sFlowStepZh">
                            <div class="cell">
                              {{item.sFlowStepZh}}
                            </div>
                          </td>
                          <td [attr.title]="listData[index].sOprStateZh">
                            <div class="cell">
                              {{item.sOprStateZh}}
                            </div>
                          </td>
                          <td [attr.title]="listData[index].sValidZh">
                            <div class="cell font-color" id="sValidZh">
                              {{item.sValidZh}}
                            </div>
                          </td>
                          <td [attr.title]="listData[index].sFileSource" (click)="changeEleStatus(index,'sFileSource','1')">
                            <div class="cell">
                              <div id="sFileSource"></div>
                              <div *ngIf="elementShow[index].sFileSource == ''">{{item.sFileSource}}</div>                              
                              <input class="input-width font-color" (blur)="changeEleStatus(index,'sFileSource','2')" *ngIf="elementShow[index].sFileSource != ''" [disabled]="item.sOprState != '1'" maxlength="2000" name="sFileSource" [(ngModel)]="listData[index].sFileSource"
                                (ngModelChange)="inputChange(index,listData[index].sFileSource,'sFileSource')">
                            </div>
                          </td>
                          <td [attr.title]="listData[index].sFileName" (click)="changeEleStatus(index,'sFileName','1')">
                            <div class="cell">
                              <div id="sFileName"></div>
                              <div *ngIf="elementShow[index].sFileName == ''">{{item.sFileName}}</div> 
                              <input class="input-width font-color" (blur)="changeEleStatus(index,'sFileName','2')" *ngIf="elementShow[index].sFileName != ''" [disabled]="item.sOprState != '1'" maxlength="100" name="sFileName" [(ngModel)]="listData[index].sFileName"
                                (ngModelChange)="inputChange(index,listData[index].sFileName,'sFileName')">
                            </div>
                          </td>
                          <td [attr.title]="listData[index].sItemTypeZh" (click)="changeEleStatus(index,'sItemType','1')">
                            <div class="cell">
                              <div id="sItemType"></div>
                              <div *ngIf="elementShow[index].sItemType == ''">{{item.sItemTypeZh}}</div> 
                              <select class="select-margin input-width font-color" (blur)="changeEleStatus(index,'sItemType','2')" *ngIf="elementShow[index].sItemType != ''" [disabled]="item.sOprState != '1'" name="sItemType" [(ngModel)]="listData[index].sItemType"
                                (ngModelChange)="inputChange(index,listData[index].sItemType,'sItemType')">
                                <option [value]="''" selected="selected">--请选择--</option>
                                <option [value]="it.sItemKey" *ngFor="let it of dictionaryList.QDII_RECORD_TYPE">{{it.sItemValue}}</option>
                              </select>
                              <!-- <input class="input-width cell" maxlength="100"> -->
                            </div>
                          </td>
                          <td [attr.title]="listData[index].sFundType" (click)="changeEleStatus(index,'sFundType','1')">

                            <div class="cell">
                                <div *ngIf="elementShow[index].sFundType == ''">{{item.sFundTypeZh}}</div> 
                              <p-multiSelect [options]="dictionaryInfo" (blur)="changeEleStatus(index,'sFundType','2')" *ngIf="elementShow[index].sFundType != ''" defaultLabel="请选择" [(ngModel)]="listData[index].sFundType" [maxSelectedLabels]="9999"
                                [ngModelOptions]="{standalone: true}"></p-multiSelect>

                            </div>
                          </td>
                          <td [attr.title]="listData[index].sFundGroupdsZh" (click)="changeEleStatus(index,'sFundGroupdsZh','1')">
                              <div *ngIf="elementShow[index].sFundGroupdsZh == ''">{{item.sFundGroupdsZh}}</div> 
                            <!-- <input class="input-width cell" maxlength="100" [(ngModel)]="listData[index].sFundGroupds"> -->
                            <div class="input-group right_tooltip cell" *ngIf="elementShow[index].sFundGroupdsZh != ''">
                              <!-- <div id="sFundGroupds"></div> -->
                              <input class="input-width font-color" (blur)="changeEleStatus(index,'sFundGroupdsZh','2')" [(ngModel)]="listData[index].sFundGroupdsZh" disabled name="sFundGroupdsZh" disabled
                                (ngModelChange)="inputChange(index,listData[index].sFundGroupdsZh,'sFundGroupdsZh')">
                              <div class="input-group-addon" (click)="showApplyQDIIName(index)">
                                <i class="fa fa-search"></i>
                              </div>
                            </div>

                          </td>

                          <td [attr.title]="listData[index].f1" (click)="changeEleStatus(index,'f1','1')">
                            <div class="cell">
                              <div id="f1"></div>
                              <div *ngIf="elementShow[index].f1 == ''">{{item.f1}}</div> 
                              <input class="input-width font-color" (blur)="changeEleStatus(index,'f1','2')" *ngIf="elementShow[index].f1 != ''" [disabled]="item.sOprState != '1'" name="f1" maxlength="2000" [(ngModel)]="listData[index].f1" (ngModelChange)="inputChange(index,listData[index].f1,'f1')">
                            </div>
                          </td>
                          <td [attr.title]="listData[index].f3" (click)="changeEleStatus(index,'f3','1')">
                            <div class="cell">
                              <div id="f3"></div>
                              <div *ngIf="elementShow[index].f3 == ''">{{item.f3}}</div> 
                              <input class="input-width font-color" (blur)="changeEleStatus(index,'f3','2')" *ngIf="elementShow[index].f3 != ''" [disabled]="item.sOprState != '1'" name="f3" maxlength="2000" [(ngModel)]="listData[index].f3" (ngModelChange)="inputChange(index,listData[index].f3,'f3')">
                            </div>
                          </td>
                          <td [attr.title]="listData[index].f4Zh" (click)="changeEleStatus(index,'f4','1')">
                            <div class="cell" style="width:169px;">
                              <div id="f4"></div>
                              <div *ngIf="elementShow[index].f4 == ''">{{item.f4}}</div> 
                              <!-- <input class="input-width" maxlength="100" name="f4" [(ngModel)]="listData[index].f4" (ngModelChange)="inputChange(index,listData[index].f4,'f4')"> -->
                              <select class="select-margin input-width font-color" (blur)="changeEleStatus(index,'f4','2')" *ngIf="elementShow[index].f4 != ''" [disabled]="item.sOprState != '1'" [(ngModel)]="listData[index].f4" name="f4" (ngModelChange)="inputChange(index,listData[index].f4,'f4')">
                                <option [value]="''" selected="selected">--请选择--</option>
                                <option [value]="it.sItemKey" *ngFor="let it of dictionaryList.RISK_BOOLMBERG_CONTROL">{{it.sItemValue}}</option>
                              </select>
                            </div>
                          </td>
                          <td [attr.title]="listData[index].f5" (click)="changeEleStatus(index,'f5','1')">
                            <div class="cell">
                              <div id="f5"></div>
                              <div *ngIf="elementShow[index].f5 == ''">{{item.f5}}</div> 
                              <input class="input-width font-color" (blur)="changeEleStatus(index,'f5','2')" *ngIf="elementShow[index].f5 != ''" [disabled]="item.sOprState != '1'" name="f5" maxlength="2000" [(ngModel)]="listData[index].f5" (ngModelChange)="inputChange(index,listData[index].f5,'f5')">
                            </div>
                          </td>
                          <td [attr.title]="listData[index].f6" (click)="changeEleStatus(index,'f6','1')">
                            <div class="cell">
                              <div id="f6"></div>
                              <div *ngIf="elementShow[index].f6 == ''">{{item.f6}}</div> 
                              <input class="input-width font-color" (blur)="changeEleStatus(index,'f6','2')" *ngIf="elementShow[index].f6 != ''" [disabled]="item.sOprState != '1'" name="f6" maxlength="2000" [(ngModel)]="listData[index].f6" (ngModelChange)="inputChange(index,listData[index].f6,'f6')">
                            </div>
                          </td>
                          <td [attr.title]="listData[index].f7" (click)="changeEleStatus(index,'f7','1')">
                            <div class="cell">

                              <div id="f7"></div>
                              <div *ngIf="elementShow[index].f7 == ''">{{item.f7}}</div> 
                              <input class="input-width font-color" (blur)="changeEleStatus(index,'f7','2')" *ngIf="elementShow[index].f7 != ''" [disabled]="item.sOprState != '1'" name="f7" maxlength="2000" [(ngModel)]="listData[index].f7" (ngModelChange)="inputChange(index,listData[index].f7,'f7')">
                            </div>
                          </td>
                          <td [attr.title]="listData[index].f8" (click)="changeEleStatus(index,'f8','1')">
                            <div class="cell">
                              <div id="f8"></div>
                              <div *ngIf="elementShow[index].f8 == ''">{{item.f8}}</div> 
                              <input class="input-width font-color" (blur)="changeEleStatus(index,'f8','2')" *ngIf="elementShow[index].f8 != ''" [disabled]="item.sOprState != '1'" name="f8" maxlength="2000" [(ngModel)]="listData[index].f8" (ngModelChange)="inputChange(index,listData[index].f8,'f8')">
                            </div>
                          </td>
                          <td [attr.title]="listData[index].f9" (click)="changeEleStatus(index,'f9','1')">
                            <div class="cell">
                              <div id="f9"></div>
                              <div *ngIf="elementShow[index].f9 == ''">{{item.f9}}</div> 
                              <input class="input-width font-color" (blur)="changeEleStatus(index,'f9','2')" *ngIf="elementShow[index].f9 != ''" [disabled]="item.sOprState != '1'" name="f9" maxlength="2000" [(ngModel)]="listData[index].f9" (ngModelChange)="inputChange(index,listData[index].f9,'f9')">
                            </div>
                          </td>
                          <td [attr.title]="listData[index].f10" (click)="changeEleStatus(index,'f10','1')">
                            <div class="cell">
                              <div id="f10"></div>
                              <div *ngIf="elementShow[index].f10 == ''">{{item.f10}}</div> 
                              <input class="input-width font-color" (blur)="changeEleStatus(index,'f10','2')" *ngIf="elementShow[index].f10 != ''" [disabled]="item.sOprState != '1'" name="f10" maxlength="2000" [(ngModel)]="listData[index].f10" (ngModelChange)="inputChange(index,listData[index].f10,'f10')">
                            </div>
                          </td>
                        </tr>
                      </tbody>
                    </table>
                  </div>
                </div>
              </div>
            </div>
            <!-- /.box-body -->
          </div>
          <!-- /.box -->
        </div>
        <!-- ./col -->
      </div>
    </div>

    <div class="modal-footer">
      <button type="button" (click)="hideModal()" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
      <!-- <button type="button" (click)="showModal('2')" class="btn btn-primary pull-right">通过</button>
      <button type="button" (click)="showModal('3')" class="btn btn-primary pull-right">不通过</button> -->
      <button type="button" (click)="showModal('2')" *ngIf="viewDetailType == '2'&&_.includes(menuResourceSet,'btn-QDII-pcms-detail-save')"
        class="btn btn-primary pull-right">通过</button>
      <button type="button" (click)="showModal('3')" *ngIf="viewDetailType == '2'&&_.includes(menuResourceSet,'btn-QDII-pcms-detail-recall')"
        class="btn btn-primary pull-right">不通过</button>
      <button type="button" *ngIf="viewDetailType == '1'&&_.includes(menuResourceSet,'btn-QDII-pcms-detail-recall')" class="btn btn-primary pull-right"
        (click)="recall()">撤销</button>
      <button type="button" *ngIf="viewDetailType == '1'&&_.includes(menuResourceSet,'btn-QDII-pcms-detail-save')" class="btn btn-primary pull-right"
        (click)="save()">保存</button>
      <!-- <button type="button" class="btn btn-primary" (click)="saveEntry()">
              <i class="fa fa-save"></i>保存</button> -->
    </div>
  </div>
</div>



<!-- 复核通过modal -->
<div class="modal modal-detail" id="modal5">
  <div #review></div>
</div>
<!-- 复核通过modal end -->



<!-- 返回modal -->
<div class="modal modal-detail" id="modal6">
  <div #back></div>
</div>
<!-- 返回modal end -->

<!-- 撤销modal -->
<div class="modal modal-detail" id="routeRevoke">
  <div #routeRevoke></div>
</div>

<!-- 适用QDII名称modal -->
<div class="modal modal-detail" id="QDIIViewApplyQDIIName">
  <div #QDIIViewApplyQDIIName></div>
</div>